import axios from "@/api/config"

export async function getTotalExamTimes(data) { //站段考试总人次
    const url = '/analysis/section/total_exam_times';
    const res = await axios.post(url,data);
    return res.data;
}

export async function getTotalExamCount(data) { //站段考试次数
    const url = '/analysis/section/total_exam_count';
    const res = await axios.post(url,data);
    return res.data;
}

export async function getTotalExamSteps(data) { //站段考试步骤数
    const url = '/analysis/section/total_exam_steps';
    const res = await axios.post(url,data);
    return res.data;
}

export async function getTotalExamInfo(data) { //站段联系信息总览
    const url = '/analysis/section/practice_info';
    const res = await axios.post(url,data);
    return res.data;
}

export async function getScoreMonth(data) { //站段每月平均分
    const url = '/analysis/section/exam_avg_score_month';
    const res = await axios.post(url,data);
    return res.data;
}

export async function getScoreExam(data) { //站段每次考试的平均分
    const url = '/analysis/section/exam_avg_score_exam';
    const res = await axios.post(url,data);
    return res.data;
}

export async function getPassRate(data) { //站段每次考试通过率
    const url = '/analysis/section/exam_once_pass_rate';
    const res = await axios.post(url,data);
    return res.data;
}

export async function getShopDataScore(data) { //时间范围内段下车间平均分排行
    const url = '/analysis/section/section_shops_date_score_rank';
    const res = await axios.post(url,data);
    return res.data;
}
export async function getShopExamScore(data) { //某一场考试车间平均分排行
    const url = '/analysis/section/section_shops_exam_score_rank';
    const res = await axios.post(url,data);
    return res.data;
}

export async function shopExamTimeRank(data) { //时间范围内车间训练时间排行
    const url = '/analysis/section/section_shops_practice_per_time_rank';
    const res = await axios.post(url,data);
    return res.data;
}
export async function shopExamCountRank(data) { //时间范围内车间训练次数排行
    const url = '/analysis/section/section_shops_practice_per_count_rank';
    const res = await axios.post(url,data);
    return res.data;
}

export async function shopsExamOnceRank(data) { //单次考试车间通过率排行
    const url = '/analysis/section/section_shops_exam_once_pass_rate_rank';
    const res = await axios.post(url,data);
    return res.data;
}
export async function sectionQuestionRank(data) { //段下考项时间范围内正确率排行
    const url = '/analysis/section/section_questions_right_date_rate_rank';
    const res = await axios.post(url,data);
    return res.data;
}
export async function stepStates(data) { //返回3个排序数组，正确率前20名，错误率前20名，严重错误率前20名
    const url = '/analysis/section/section_step_states_date_ranks';
    const res = await axios.post(url,data);
    return res.data;
} 
export async function stepErrorDes(data) { //某题某步时间范围内错误情况分布，饼图表示
    const url = '/analysis/section/section_step_date_error_distribution';
    const res = await axios.post(url,data);
    return res.data;
}
export async function sectionQuestionInfo(data) { //站段时间范围内某一项考试时，最短用时，最长用时和平均用时
    const url = '/analysis/section/section_question_date_info';
    const res = await axios.post(url,data);
    return res.data;
} 
export async function sectionQuestionRightRank(data) { //段下时间范围内具体某一项车间正确率排行
    const url = '/analysis/section/section_some_question_shop_right_date_rank';
    const res = await axios.post(url,data);
    return res.data;
}
export async function sectionStepRightInfo(data) { //站段时间范围内某一项下的某一步考试时，最短用时，最长用时和平均用时
    const url = '/analysis/section/section_step_date_info';
    const res = await axios.post(url,data);
    return res.data;
}
export async function sectionExamRightRank(data) { //段下某次考试具体某一项车间正确率排行 
    const url = '/analysis/section/section_some_question_shop_right_exam_rank';
    const res = await axios.post(url,data);
    return res.data;
}
export async function shopRighDateRank(data) { //具体步骤时间范围内车间正确率排行 
    const url = '/analysis/section/section_some_step_shop_right_date_rank';
    const res = await axios.post(url,data);
    return res.data;
}
export async function examShopStepRighRank(data) { //段下某次考试具体某一项某一步车间正确率排行  
    const url = '/analysis/section/section_some_step_shop_right_exam_rank';
    const res = await axios.post(url,data);
    return res.data;
}